#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
    int a, b;
    scanf("%d%d", &a, &b);
    a ^= b;
    int count = 0;
    while (a) {
        a = a & (a - 1);
        count++;
    }
    printf("%d", count);
    return 0;
}